/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author ADMIN
 */
@Entity
@Table(name = "class")
@NamedQueries({
    @NamedQuery(name = "Class.findAll", query = "SELECT c FROM Class c"),
    @NamedQuery(name = "Class.findByClid", query = "SELECT c FROM Class c WHERE c.clid = :clid"),
    @NamedQuery(name = "Class.findByTid", query = "SELECT c FROM Class c WHERE c.tid = :tid"),
    @NamedQuery(name = "Class.findByClname", query = "SELECT c FROM Class c WHERE c.clname = :clname"),
    @NamedQuery(name = "Class.findByClcreatetime", query = "SELECT c FROM Class c WHERE c.clcreatetime = :clcreatetime")})
public class Class implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "clid")
    private Integer clid;
    @Column(name = "tid")
    private String tid;
    @Basic(optional = false)
    @Column(name = "clname")
    private String clname;
    @Basic(optional = false)
    @Column(name = "clcreatetime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date clcreatetime;

    public Class() {
    }

    public Class(Integer clid) {
        this.clid = clid;
    }

    public Class(Integer clid, String clname, Date clcreatetime) {
        this.clid = clid;
        this.clname = clname;
        this.clcreatetime = clcreatetime;
    }

    public Integer getClid() {
        return clid;
    }

    public void setClid(Integer clid) {
        this.clid = clid;
    }

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    public String getClname() {
        return clname;
    }

    public void setClname(String clname) {
        this.clname = clname;
    }

    public Date getClcreatetime() {
        return clcreatetime;
    }

    public void setClcreatetime(Date clcreatetime) {
        this.clcreatetime = clcreatetime;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (clid != null ? clid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Class)) {
            return false;
        }
        Class other = (Class) object;
        if ((this.clid == null && other.clid != null) || (this.clid != null && !this.clid.equals(other.clid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.Class[clid=" + clid + "]";
    }

}
